;------------------------------------------------------------
;
; Events file for Kyokujitsu
;
; By: DarthVeda
; April 12, 2001
; Last Change: Version .9b
; Events for July 1938 - October 1938
; Copyright (C) 2000, 2001, 2002
;
;------------------------------------------------------------

;------------------------------------------------------------
; Flags Used
;
; The following flags have been used.
;
; Chinese
; 0 - Objective Complete
; 1 - Nanking Captured Early (On/Off) (Flag Tech 1 (33))
; 2 - Turn 17
; -Southern Offensive - Flag Tech 4 (40)
; IJA
; -Defeat Russia #1 - Flag Tech 2 (36)
;
;------------------------------------------------------------

@BEGINEVENTS

;@DEBUG

@INITFLAG

@IF
ReceivedTechnology
receiver=IJN
technology=85
@AND
ScenarioLoaded
@THEN
TakeTechnology
whom=IJN
technology=85
@ENDIF

@IF
ReceivedTechnology
receiver=Chinese
technology=33
@THEN
JustOnce
Flag
Continuous
who=Chinese
state=On
flag=1
@ENDIF

@IF
ScenarioLoaded
@THEN
JustOnce
Flag
Continuous
who=Chinese
state=On
flag=0
@ENDIF

@IF
ScenarioLoaded
@THEN
JustOnce
Transport
unit=Transport
state=On
mode=Use
type=0
@ENDIF

@IF
ScenarioLoaded
@THEN
JustOnce
Transport
unit=Transport
state=On
mode=Use
type=1
@ENDIF

@IF
ScenarioLoaded
@THEN
JustOnce
Transport
unit=Transport
state=On
mode=Use
type=2
@ENDIF

;------------------------------------------------------------
;
; Negotiations Event
;
; Prevent the cowardly AI's from making peace and what not
;
;------------------------------------------------------------

@IF
Negotiation
talker=Anybody
talkertype=HumanOrComputer
listener=Anybody
listenertype=HumanOrComputer
@THEN
@ENDIF

@IF
Turn
turn=Every
@THEN
MakeAgression
who=Chinese
whom=IJA
@ENDIF

@IF
Turn
turn=Every
@THEN
MakeAgression
who=Chinese
whom=IJN
@ENDIF

; No attacking the Allies!

@IF
UnitKilled
unit=AnyUnit
attacker=IJA
Defender Only
defender=Allies
@THEN
Text
^ Your premature attack on the United States is unacceptable.
YOU HAVE BEEN RELIEVED.
endtext
DestroyACivilization
whom=IJA
@ENDIF

@IF
UnitKilled
unit=AnyUnit
attacker=IJN
Defender Only
defender=Allies
@THEN
Text
^ Your premature attack on the United States is unacceptable.
YOU HAVE BEEN RELIEVED.
endtext
DestroyACivilization
whom=IJN
@ENDIF

;------------------------------------------------------------
;
; Japanese Requesition Events
;
; The following events will allow the Japanese player to
; acquire additional units
;
;------------------------------------------------------------

;Begin IJA Infantry

@IF
ReceivedTechnology
receiver=IJA
technology=51
@THEN
CreateUnit
owner=IJA
unit=Nipponese
Count=3
veteran=No
homecity=Tokyo
locations
78,80,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJA
technology=50
@THEN
CreateUnit
owner=IJA
unit=Nipponese
Count=3
veteran=No
homecity=Tokyo
locations
78,80,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJA
technology=49
@THEN
CreateUnit
owner=IJA
unit=Nipponese
Count=2
veteran=No
homecity=Tokyo
locations
78,80,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJA
technology=48
@THEN
CreateUnit
owner=IJA
unit=Nipponese
veteran=No
homecity=Tokyo
locations
78,80,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJA
technology=51
@THEN
ChangeMoney
receiver=IJA
amount=-45
TakeTechnology
whom=IJA
technology=51
@ENDIF

@IF
ReceivedTechnology
receiver=IJA
technology=50
@THEN
ChangeMoney
receiver=IJA
amount=-45
TakeTechnology
whom=IJA
technology=50
@ENDIF

@IF
ReceivedTechnology
receiver=IJA
technology=49
@THEN
ChangeMoney
receiver=IJA
amount=-45
TakeTechnology
whom=IJA
technology=49
@ENDIF

@IF
ReceivedTechnology
receiver=IJA
technology=48
@THEN
ChangeMoney
receiver=IJA
amount=-45
TakeTechnology
whom=IJA
technology=48
@ENDIF

; end of IJA Infantry
; Begin IJA Fighters
 
@IF
ReceivedTechnology
receiver=IJA
technology=58
@THEN
CreateUnit
owner=IJA
unit=Ki-27 Nate
veteran=No
homecity=Tokyo
locations
78,80,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJA
technology=52
@THEN
CreateUnit
owner=IJA
unit=Ki-27 Nate
veteran=No
homecity=Tokyo
locations
78,80,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJA
technology=52
@THEN
ChangeMoney
receiver=IJA
amount=-80
TakeTechnology
whom=IJA
technology=52
@ENDIF

@IF
ReceivedTechnology
receiver=IJA
technology=58
@THEN
ChangeMoney
receiver=IJA
amount=-80
TakeTechnology
whom=IJA
technology=58
@ENDIF

; end IJA fighters
; Begin IJA Ground Equipment

@IF
ReceivedTechnology
receiver=IJA
technology=62
@THEN
CreateUnit
owner=IJA
unit=Artillery
veteran=No
homecity=Tokyo
locations
78,80,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJA
technology=62
@THEN
CreateUnit
owner=IJA
unit=Armored Infantry
veteran=No
homecity=Tokyo
locations
78,80,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJA
technology=61
@THEN
CreateUnit
owner=IJA
unit=Artillery
veteran=No
homecity=Tokyo
locations
78,80,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJA
technology=61
@THEN
CreateUnit
owner=IJA
unit=Armored Infantry
veteran=No
homecity=Tokyo
locations
78,80,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJA
technology=61
@THEN
ChangeMoney
receiver=IJA
amount=-65
TakeTechnology
whom=IJA
technology=61
@ENDIF

@IF
ReceivedTechnology
receiver=IJA
technology=62
@THEN
ChangeMoney
receiver=IJA
amount=-65
TakeTechnology
whom=IJA
technology=62
@ENDIF

; end IJA ground equipment
; Begin IJA Bombers

; -- to be inserted later

; end IJA Bombers
; Being IJA Transports

@IF
ReceivedTechnology
receiver=IJA
technology=99
@THEN
CreateUnit
owner=IJA
unit=Transport
veteran=No
homecity=Tokyo
locations
78,80,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJA
technology=98
@THEN
CreateUnit
owner=IJA
unit=Transport
veteran=No
homecity=Tokyo
locations
78,80,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJA
technology=99
@THEN
ChangeMoney
receiver=IJA
amount=-80
TakeTechnology
whom=IJA
technology=99
@ENDIF

@IF
ReceivedTechnology
receiver=IJA
technology=98
@THEN
ChangeMoney
receiver=IJA
amount=-80
TakeTechnology
whom=IJA
technology=98
@ENDIF

; end of IJA Transports
; Begin IJN Infantry

@IF
ReceivedTechnology
receiver=IJN
technology=51
@THEN
CreateUnit
owner=IJN
unit=Marines
Count=2
veteran=No
homecity=Hiroshima
locations
57,71,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=50
@THEN
CreateUnit
owner=IJN
unit=Marines
Count=2
veteran=No
homecity=Hiroshima
locations
57,71,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=49
@THEN
CreateUnit
owner=IJN
unit=Marines
veteran=No
homecity=Hiroshima
locations
57,71,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=48
@THEN
CreateUnit
owner=IJN
unit=Marines
veteran=No
homecity=Hiroshima
locations
57,71,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=51
@THEN
ChangeMoney
receiver=IJN
amount=-45
TakeTechnology
whom=IJN
technology=51
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=50
@THEN
ChangeMoney
receiver=IJN
amount=-45
TakeTechnology
whom=IJN
technology=50
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=49
@THEN
ChangeMoney
receiver=IJN
amount=-45
TakeTechnology
whom=IJN
technology=49
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=48
@THEN
ChangeMoney
receiver=IJN
amount=-45
TakeTechnology
whom=IJN
technology=48
@ENDIF

; end IJN Infantry
; Begin IJN Fighter

@IF
ReceivedTechnology
receiver=IJN
technology=58
@THEN
CreateUnit
owner=IJN
unit=A2N1
veteran=No
homecity=Hiroshima
locations
57,71,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=52
@THEN
CreateUnit
owner=IJN
unit=A2N1
veteran=No
homecity=Hiroshima
locations
57,71,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=58
@THEN
ChangeMoney
receiver=IJN
amount=-80
TakeTechnology
whom=IJN
technology=58
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=52
@THEN
ChangeMoney
receiver=IJN
amount=-80
TakeTechnology
whom=IJN
technology=52
@ENDIF

; end IJN Fighter
; Begin IJN Ground Equipment

@IF
ReceivedTechnology
receiver=IJN
technology=62
@THEN
CreateUnit
owner=IJN
unit=Artillery
veteran=No
homecity=Hiroshima
locations
57,71,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=61
@THEN
CreateUnit
owner=IJN
unit=Artillery
veteran=No
homecity=Hiroshima
locations
57,71,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=62
@THEN
ChangeMoney
receiver=IJN
amount=-65
TakeTechnology
whom=IJN
technology=62
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=62
@THEN
ChangeMoney
receiver=IJN
amount=-65
TakeTechnology
whom=IJN
technology=62
@ENDIF

; end IJN Ground Equipment
; begin IJN Bomber

@IF
ReceivedTechnology
receiver=IJN
technology=63
@THEN
CreateUnit
owner=IJN
unit=G3M3 Nell
veteran=No
homecity=Hiroshima
locations
57,71,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=64
@THEN
CreateUnit
owner=IJN
unit=G3M3 Nell
veteran=No
homecity=Hiroshima
locations
57,71,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=63
@THEN
ChangeMoney
receiver=IJN
amount=-120
TakeTechnology
whom=IJN
technology=63
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=64
@THEN
ChangeMoney
receiver=IJN
amount=-120
TakeTechnology
whom=IJN
technology=64
@ENDIF

; end of IJN Bombers
; Begin IJN Attack Aircraft

@IF
ReceivedTechnology
receiver=IJN
technology=65
@THEN
CreateUnit
owner=IJN
unit=D1A2 Susie
veteran=No
homecity=Hiroshima
locations
57,71,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=68
@THEN
CreateUnit
owner=IJN
unit=B5N1 Kate
veteran=No
homecity=Hiroshima
locations
57,71,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=65
@THEN
ChangeMoney
receiver=IJN
amount=-100
TakeTechnology
whom=IJN
technology=65
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=68
@THEN
ChangeMoney
receiver=IJN
amount=-100
TakeTechnology
whom=IJN
technology=68
@ENDIF

; end of IJN Attack Aircraft
; Begin IJN Transports

@IF
ReceivedTechnology
receiver=IJN
technology=99
@THEN
CreateUnit
owner=IJN
unit=Transport
Count=2
veteran=No
homecity=Hiroshima
locations
57,71,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=98
@THEN
CreateUnit
owner=IJN
unit=Transport
Count=2
veteran=No
homecity=Hiroshima
locations
57,71,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=99
@THEN
ChangeMoney
receiver=IJN
amount=-80
TakeTechnology
whom=IJN
technology=99
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=98
@THEN
ChangeMoney
receiver=IJN
amount=-80
TakeTechnology
whom=IJN
technology=98
@ENDIF

; end IJN Transports
; Begin IJN Submarines

@IF
ReceivedTechnology
receiver=IJN
technology=88
@THEN
CreateUnit
owner=IJN
unit=C-1 Sub
veteran=No
homecity=Hiroshima
locations
57,71,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=88
@THEN
ChangeMoney
receiver=IJN
amount=-180
TakeTechnology
whom=IJN
technology=88
@ENDIF

; end IJN Submarines
; Begin IJN Light Cruisers

@IF
ReceivedTechnology
receiver=IJN
technology=90
@THEN
CreateUnit
owner=IJN
unit=Light Cruiser
veteran=No
homecity=Hiroshima
locations
57,71,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=91
@THEN
CreateUnit
owner=IJN
unit=Light Cruiser
veteran=No
homecity=Hiroshima
locations
57,71,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=90
@THEN
ChangeMoney
receiver=IJN
amount=-320
TakeTechnology
whom=IJN
technology=90
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=91
@THEN
ChangeMoney
receiver=IJN
amount=-320
TakeTechnology
whom=IJN
technology=91
@ENDIF

; end of IJN Light Cruisers
; begin IJN Destroyers

@IF
ReceivedTechnology
receiver=IJN
technology=94
@THEN
CreateUnit
owner=IJN
unit=Destroyer
veteran=No
homecity=Hiroshima
locations
57,71,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=95
@THEN
CreateUnit
owner=IJN
unit=Destroyer
veteran=No
homecity=Hiroshima
locations
57,71,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=96
@THEN
CreateUnit
owner=IJN
unit=Destroyer
veteran=No
homecity=Hiroshima
locations
57,71,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=97
@THEN
CreateUnit
owner=IJN
unit=Destroyer
veteran=No
homecity=Hiroshima
locations
57,71,1
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=94
@THEN
ChangeMoney
receiver=IJN
amount=-180
TakeTechnology
whom=IJN
technology=94
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=95
@THEN
ChangeMoney
receiver=IJN
amount=-180
TakeTechnology
whom=IJN
technology=95
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=96
@THEN
ChangeMoney
receiver=IJN
amount=-180
TakeTechnology
whom=IJN
technology=96
@ENDIF

@IF
ReceivedTechnology
receiver=IJN
technology=97
@THEN
ChangeMoney
receiver=IJN
amount=-180
TakeTechnology
whom=IJN
technology=97
@ENDIF

;------------------------------------------------------------
; Historical Events
;
; The following events help carve history through China
;
;------------------------------------------------------------

@IF
CityTaken
city=AnyCity
attacker=Chinese
defender=Anybody
@AND
CheckFlag
who=Chinese
flag=1
State=Off
@THEN
Text
^Your failure to hold onto your gains will be the end of us.
^
^YOU HAVE BEEN RELIEVED.
endtext
Flag
Continuous
who=Chinese
state=Off
flag=0
@ENDIF

@IF
ScenarioLoaded
@THEN
JustOnce
Text
^------------------------- Briefing -------------------------
endtext
@ENDIF

@IF
ScenarioLoaded
@THEN
JustOnce
Text
^With the winds of Summer comes the anniversery of the beginning
of the conflict with China.
^
^The Chinese have been preparing throughout the winter and
High Command believes that their desire to hold what is left of
their nation has come.
endtext
@ENDIF

@IF
ScenarioLoaded
@THEN
JustOnce
Text
^Your objectives for this month are to hold all your cities
no matter the cost.
^
^High command has recommended that we give our forces a chance
to rest before pressing deeper into the Chinese countryside.  Perhaps
it is time, if you have not already done so, to capture the last major 
Chinese ports at Swatow, Canton, and Macao, and block their ability 
to receive heavy weaponry.
endtext
@ENDIF

@IF
ScenarioLoaded
@THEN
JustOnce
Text
^The Soviets to the North have also been making rumblings.  Not
only is the newly prepared Chinese army armed with Soviet equipment,
the Red Army has brazenly fortified positions in our territory.
^
^The road they have occupied is a vital lifeline to Pinkiang.  They
must not be allowed to keep it.  You are authorized to remove them
by force.  However, do not take any Russian cities.  It will likely
provoke the Russians into a full scale war.
endtext
CreateUnit
owner=IJA
unit=Map Revealer
veteran=No
homecity=None
locations
74,32,1
74,30,1
76,30,1
endlocations
@ENDIF

@IF
ScenarioLoaded
@THEN
JustOnce
Text
^---------------------- Technology Update ----------------------
^
^ Technicians are pleased to inform you that the Ki-27 Fighter
^ is now available for requestion by the Army.
^
^ Your existing Ki-10 Squadrons have been upgraded with this new
^ fighter that has longer range abilities.
^
^---------------------------------------------------------------
endtext
@ENDIF

@IF
ScenarioLoaded
@THEN
JustOnce
CreateUnit
owner=Red Army
unit=Fortified Position
veteran=Yes
homecity=None
locations
75,31,1
endlocations
@ENDIF

@IF
UnitKilled
unit=Soviet General
attacker=Anybody
defender=Red Army
@THEN
Text
^Licking their wounds, the humiliated Russian Army has
retreated back hehind their borders.  Congratulations,
commander, this is indeed a great victory.  It will
remind the Soviets just how potent our armies are.
endtext
GiveTechnology
technology=36
receiver=IJA
Flag
Continuous
who=Red Army
state=On
flag=0
@ENDIF

@IF
ScenarioLoaded
@THEN
JustOnce
Text
^Keep hold of all your current positions and High Command will
look favorably upon your generalship. Destroying the Soviet position 
is a secondary goal that does not need to be accomplished for victory
this summer. 
endtext
@ENDIF

@IF
ScenarioLoaded
@THEN
JustOnce
CreateUnit
owner=IJA
unit=Map Revealer
veteran=No
homecity=None
locations
86,50,0
84,50,0
85,51,0
endlocations
@ENDIF

@IF
ScenarioLoaded
@THEN
JustOnce
CreateUnit
owner=IJA
unit=Map Revealer
veteran=No
homecity=None
locations
96,56,0
95,59,0
97,59,0
endlocations
@ENDIF

@IF
Turn
turn=Every
@THEN
JustOnce
CreateUnit
owner=Chinese
unit=Chinese Irregulars
Count=4
veteran=Yes
homecity=None
Randomize
locations
42,22,1
40,26,1
45,25,1
endlocations
@ENDIF

@IF
Turn
turn=Every
@THEN
CreateUnit
owner=Chinese
unit=Chinese Irregulars
Count=4
veteran=Yes
homecity=None
Randomize
locations
51,21,1
46,32,1
37,37,1
endlocations
@ENDIF

@IF
Turn
turn=Every
@THEN
CreateUnit
owner=Chinese
unit=Guerillas
Count=4
veteran=Yes
homecity=None
Randomize
locations
33,25,1
37,23,1
40,20,1
endlocations
@ENDIF

@IF
Turn
turn=Every
@THEN
CreateUnit
owner=Chinese
unit=Chinese Regulars
Count=3
veteran=Yes
homecity=None
locations
16,18,1
endlocations
@ENDIF

@IF
Turn
turn=Every
@THEN
CreateUnit
owner=Chinese
unit=T-26 Tank
veteran=Yes
homecity=None
locations
16,18,1
endlocations
@ENDIF

@IF
Turn
turn=Every
@THEN
CreateUnit
owner=Chinese
unit=Cavalry
Count=2
veteran=Yes
homecity=None
locations
16,18,1
endlocations
@ENDIF

@IF
Turn
turn=Every
@THEN
CreateUnit
owner=Chinese
unit=Artillery
veteran=Yes
homecity=None
locations
16,18,1
endlocations
@ENDIF

@IF
Turn
turn=Every
@THEN
MoveUnit
unit=AnyUnit
owner=Chinese
Map=1
maprect
15,17,17,17,17,19,15,19
moveto
30,34
numbertomove=All
@ENDIF

@IF
UnitKilled
unit=AnyUnit
attacker=Anybody
defender=Anybody
@THEN
MoveUnit
unit=AnyUnit
owner=Chinese
Map=1
maprect
15,17,17,17,17,19,15,19
moveto
30,34
numbertomove=All
@ENDIF

@IF
Turn
turn=Every
@THEN
MoveUnit
unit=AnyUnit
owner=Chinese
Map=1
maprect
14,36,16,36,16,38,14,38
moveto
25,41
numbertomove=All
@ENDIF

@IF
UnitKilled
unit=AnyUnit
attacker=Anybody
defender=Anybody
@THEN
MoveUnit
unit=AnyUnit
owner=Chinese
Map=1
maprect
14,36,16,36,16,38,14,38
moveto
25,41
numbertomove=All
@ENDIF

@IF
Turn
turn=Every
@THEN
CreateUnit
owner=Chinese
unit=Artillery
veteran=Yes
homecity=None
locations
15,37,1
endlocations
@ENDIF

@IF
Turn
turn=Every
@THEN
CreateUnit
owner=Chinese
unit=Chinese Regulars
Count=3
veteran=Yes
homecity=Lanchow
locations
15,37,1
endlocations
@ENDIF

@IF
Turn
turn=Every
@THEN
CreateUnit
owner=Chinese
unit=Cavalry
veteran=Yes
homecity=None
locations
15,37,1
endlocations
@ENDIF

@IF
Turn
turn=Every
@THEN
CreateUnit
owner=Chinese
unit=T-26 Tank
veteran=Yes
homecity=None
locations
15,37,1
endlocations
@ENDIF

@IF
UnitKilled
unit=Artillery
attacker=Anybody
Defender Only
defender=Chinese
@THEN
CreateUnit
owner=Chinese
unit=Cavalry
Count=2
veteran=Yes
homecity=None
locations
11,55,1
endlocations
@ENDIF

@IF
UnitKilled
unit=Artillery
attacker=Anybody
defender=Chinese
@THEN
MoveUnit
unit=AnyUnit
owner=Chinese
Map=1
maprect
10,54,12,54,12,56,10,56
moveto
46,22
numbertomove=All
@ENDIF

@IF
UnitKilled
unit=Guerillas
attacker=Anybody
defender=Anybody
@THEN
CreateUnit
owner=Chinese
unit=Cavalry
veteran=Yes
homecity=Taiyuan
locations
60,30,1
endlocations
@ENDIF

@IF
UnitKilled
unit=Guerillas
attacker=Anybody
defender=Anybody
@THEN
MoveUnit
unit=AnyUnit
owner=Chinese
Map=1
maprect
31,19,33,19,33,21,31,21
moveto
25,41
numbertomove=All
@ENDIF

@IF
Turn
turn=Every
@THEN
CreateUnit
owner=Chinese
unit=Chinese Irregulars
Count=2
veteran=Yes
homecity=None
Randomize
locations
3,49,1
2,40,1
5,53,1
7,49,1
7,53,1
3,45,1
4,42,1
1,51,1
endlocations
@ENDIF

@IF
Turn
turn=Every
@THEN
CreateUnit
owner=Chinese
unit=Chinese Irregulars
Count=2
veteran=Yes
homecity=None
Randomize
locations
5,53,1
7,49,1
7,53,1
3,45,1
4,42,1
1,51,1
3,49,1
2,40,1
endlocations
@ENDIF

@IF
Turn
turn=Every
@THEN
CreateUnit
owner=Chinese
unit=Chinese Irregulars
Count=2
veteran=Yes
homecity=None
Randomize
locations
2,40,1
5,53,1
7,49,1
7,53,1
3,45,1
4,42,1
1,51,1
3,49,1
endlocations
@ENDIF

@IF
Turn
turn=every
@THEN
MoveUnit
unit=AnyUnit
owner=Chinese
Map=1
maprect
0,40,10,40,10,54,0,54
moveto
30,48
numbertomove=All
@ENDIF

; - Southern Offensive triggered

@IF
CityTaken
city=Canton
attacker=Anybody
defender=Chinese
@THEN
JustOnce
GiveTechnology
technology=40
receiver=Chinese
@ENDIF

@IF
CityTaken
city=Macao
attacker=Anybody
defender=Chinese
@THEN
JustOnce
GiveTechnology
technology=40
receiver=Chinese
@ENDIF

@IF
CityTaken
city=Haikou
attacker=Anybody
defender=Chinese
@THEN
JustOnce
GiveTechnology
technology=40
receiver=Chinese
@ENDIF

@IF
CityTaken
city=Nanning
attacker=Anybody
defender=Chinese
@THEN
JustOnce
GiveTechnology
technology=40
receiver=Chinese
@ENDIF

@IF
CityTaken
city=Swatow
attacker=Anybody
defender=Chinese
@THEN
JustOnce
GiveTechnology
technology=40
receiver=Chinese
@ENDIF

@IF
ReceivedTechnology
receiver=Chinese
technology=40
@THEN
JustOnce
Text
^Chinese armies in the South, until now bottled up and
left out of the war, spring into action with the Japanese invasion
of the Southeast.
^
^Additionally, Chinese Warlords have decided to make their
presence in the area known.  Expect massive amounts of
poor infantry from the Warlords to hamper your operations in this sector.
endtext
@ENDIF

@IF
ReceivedTechnology
receiver=Chinese
technology=40
@THEN
CreateUnit
owner=Chinese
unit=Cavalry
Count=2
veteran=Yes
homecity=None
locations
74,38,0
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=Chinese
technology=40
@THEN
CreateUnit
owner=Chinese
unit=Machine Gun
Count=2
veteran=Yes
homecity=None
locations
74,38,0
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=Chinese
technology=40
@THEN
CreateUnit
owner=Chinese
unit=Chinese Regulars
Count=2
veteran=No
homecity=None
locations
74,38,0
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=Chinese
technology=40
@THEN
CreateUnit
owner=Chinese
unit=Chinese Regulars
veteran=No
homecity=None
locations
74,36,0
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=Chinese
technology=40
@THEN
CreateUnit
owner=Chinese
unit=Chinese Regulars
veteran=Yes
homecity=None
locations
85,29,0
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=Chinese
technology=40
@THEN
MoveUnit
unit=AnyUnit
owner=Chinese
Map=0
maprect
73,37,75,37,75,39,73,39
moveto
86,48
numbertomove=All
@ENDIF

@IF
ReceivedTechnology
receiver=Chinese
technology=40
@THEN
CreateUnit
owner=Chinese
unit=Cavalry
veteran=Yes
homecity=None
locations
96,42,0
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=Chinese
technology=40
@THEN
CreateUnit
owner=Chinese
unit=Chinese Regulars
veteran=Yes
homecity=None
locations
96,42,0
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=Chinese
technology=40
@THEN
MoveUnit
unit=AnyUnit
owner=Chinese
Map=0
maprect
95,41,97,41,97,43,95,43
moveto
71,49
numbertomove=All
@ENDIF

@IF
ReceivedTechnology
receiver=Chinese
technology=40
@THEN
CreateUnit
owner=Chinese
unit=Chinese Irregulars
Count=2
veteran=No
homecity=None
Randomize
locations
91,45,0
94,54,0
83,43,0
76,48,0
92,40,0
80,38,0
78,44,0
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=Chinese
technology=40
@THEN
CreateUnit
owner=Chinese
unit=Chinese Irregulars
Count=2
veteran=No
homecity=None
Randomize
locations
94,54,0
83,43,0
76,48,0
92,40,0
80,38,0
78,44,0
91,45,0
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=Chinese
technology=40
@THEN
CreateUnit
owner=Chinese
unit=Chinese Irregulars
Count=2
veteran=No
homecity=None
Randomize
locations
83,43,0
76,48,0
92,40,0
80,38,0
78,44,0
91,45,0
94,54,0
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=Chinese
technology=40
@THEN
CreateUnit
owner=Chinese
unit=Chinese Irregulars
Count=2
veteran=Yes
homecity=None
Randomize
locations
76,48,0
92,40,0
80,38,0
78,44,0
91,45,0
94,54,0
83,43,0
endlocations
@ENDIF

@IF
ReceivedTechnology
receiver=Chinese
technology=40
@THEN
MoveUnit
unit=Chinese Irregulars
owner=Chinese
Map=0
maprect
71,39,81,39,81,55,71,55
moveto
71,49
numbertomove=All
@ENDIF

@IF
ReceivedTechnology
receiver=Chinese
technology=40
@THEN
MoveUnit
unit=Chinese Irregulars
owner=Chinese
Map=0
maprect
81,35,97,35,97,61,81,61
moveto
86,48
numbertomove=All
@ENDIF

;------------------------------------------------------------
;
; File Change Statement
;
; The part of the program where we make the User work for
; their enjoyment :)
;
;------------------------------------------------------------

@IF
Turn
turn=17
@THEN
Flag
who=Chinese
state=On
flag=2
@ENDIF

@IF
Turn
turn=17
@AND
CheckFlag
who=Red Army
flag=0
state=Off
@THEN
Text
^Confident in themselves, the Russian armies
have returned to within their borders, leaving
scorched earth in their path.
endtext
ChangeTerrain
Map=1
terraintype=0
maprect
75,31,75,31,75,31,75,31
@ENDIF

@IF
CheckFlag
who=Chinese
mask=0b00000000000000000000000000000101
Threshold=2
State=On
@AND
CheckFlag
who=Chinese
flag=1
State=Off
@THEN
Text
^By holding onto all your gains of the past
months, you have greatly impressed High Command,
congratulations!
^
^You may now load part 5 of Kyokujitsu!
endtext
@ENDIF

@IF
CheckFlag
who=Chinese
mask=0b00000000000000000000000000000101
Threshold=2
State=On
@AND
CheckFlag
who=Chinese
flag=1
State=On
@THEN
Text
^By holding onto all your gains of the past
months, you have greatly impressed High Command,
congratulations!
^
^You may now load part 5 of Kyokujitsu!
endtext
@ENDIF

@IF
CheckFlag
who=Chinese
flag=0
State=Off
@AND
CheckFlag
who=Chinese
mask=0b00000000000000000000000000000110
Threshold=2
State=On
@THEN
Text
^Although High Command is dismayed at your inability
to hold onto your gains, you still hold some favor
with them.  They have chosen to retain you anyway.
^
^You are now ready to play part 5 of Kyokujitsu!
endtext
TakeTechnology
whom=Chinese
technology=33
@ENDIF

@IF
Turn
turn=17
@AND
CheckFlag
who=Chinese
mask=0b00000000000000000000000000000011
Threshold=2
State=Off
@THEN
Text
^Your failure to hold onto your gains, along
with your refusal to relinquish the reigns of
command with due speed, are too much for High Command 
to endure.
^
^YOU HAVE BEEN EXECUTED.
endtext
@ENDIF

@IF
Turn
turn=17
@AND
CheckFlag
who=Chinese
mask=0b00000000000000000000000000000011
Threshold=2
State=Off
@THEN
Text
^Unfortunately, you have lost the fourth part of Kyokujitsu. But,
^you can always go back and try again!
endtext
EndGame
endscreens=No
@ENDIF

@ENDEVENTS
